package com.irdstudio.efp.esb.api.bean.psd.credit.req;

import com.alibaba.fastjson.annotation.JSONField;
import com.irdstudio.basic.framework.core.annotation.DicType;
import com.irdstudio.efp.esb.api.common.GroupeInterface.psd;
import com.irdstudio.efp.esb.common.constant.nls.NlsRiskControlEnum;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

public class PsdCreditBackReqBean implements Serializable {

    // 授信申请流水号
    @JSONField(name = "CrAppSrlNo")
    @NotNull(groups = {psd.class})
    @NotEmpty(groups = {psd.class})
    @Length(max = 64, groups = {psd.class})
    private String CrAppSrlNo;


    // 审批结果标志
    @JSONField(name = "AprvlRsltFlg")
    @NotNull(groups = {psd.class})
    @NotEmpty(groups = {psd.class})
    @Length(max = 5, groups = {psd.class})
    @DicType(dicType = NlsRiskControlEnum.class, method = "getValue", groups = {psd.class})
    private String AprvlRsltFlg;


    // 拒绝原因
    @JSONField(name = "RfsRsn")
    @Length(max = 2048, groups = {psd.class})
    private String RfsRsn;

    // 拒绝码
    @JSONField(name = "RfsCd")
    @Length(max = 1024, groups = {psd.class})
    private String RfsCd;

    //建议授信额度	Double(21,2)
    @Digits(integer = 21, fraction = 2, groups = {psd.class}, message = "LoanAplLmt 数字校验异常")
    @JSONField(name = "LoanAplLmt")
    private BigDecimal LoanAplLmt;

    //建议年利率	Double(12,7)
    @JSONField(name = "YrRate")
    @Digits(integer = 12, fraction = 7, groups = {psd.class}, message = "YrRate 数字校验异常")
    private BigDecimal YrRate;

    /**
     * 企业类型
     */
    @JSONField(name = "EntpTp")
    private String enTp;

    public String getCrAppSrlNo() {
        return CrAppSrlNo;
    }

    public void setCrAppSrlNo(String crAppSrlNo) {
        CrAppSrlNo = crAppSrlNo;
    }

    public String getAprvlRsltFlg() {
        return AprvlRsltFlg;
    }

    public void setAprvlRsltFlg(String aprvlRsltFlg) {
        AprvlRsltFlg = aprvlRsltFlg;
    }

    public String getRfsRsn() {
        return RfsRsn;
    }

    public void setRfsRsn(String rfsRsn) {
        RfsRsn = rfsRsn;
    }

    public String getRfsCd() {
        return RfsCd;
    }

    public void setRfsCd(String rfsCd) {
        RfsCd = rfsCd;
    }

    public BigDecimal getLoanAplLmt() {
        return LoanAplLmt;
    }

    public void setLoanAplLmt(BigDecimal loanAplLmt) {
        LoanAplLmt = loanAplLmt;
    }

    public BigDecimal getYrRate() {
        return YrRate;
    }

    public void setYrRate(BigDecimal yrRate) {
        YrRate = yrRate;
    }

    public String getEnTp() {
        return enTp;
    }

    public void setEnTp(String enTp) {
        this.enTp = enTp;
    }
}